package com.xiaoxin.dubbo.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoxin.model.domain.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author xiaoxiaode
 * @date 2021-08-29-13:23
 **/
public interface UserInfoMapper extends BaseMapper<UserInfo> {

    @Select("SELECT * FROM tb_user_info where id in(\n" +
            "SELECT black_user_id from tb_black_list where user_id=#{id}" +
            ")")
    IPage<UserInfo> findBlackList(@Param("pages") Page pages, @Param("id") Long id);
}
